package com.vehicle.controller;

import com.vehicle.bean.DataGridView;
import com.vehicle.pojo.Permission;
import com.vehicle.service.PermissionService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/permission")
public class PermissionController {
    @Autowired
    private PermissionService permissionService;
    private Logger logger=Logger.getLogger(this.getClass());

    @ResponseBody
    @RequestMapping("/permissions")
    public DataGridView list(Permission permission){
        return permissionService.findPermissionByPage(permission);
    }
}
